package controller;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JButton;
import javax.swing.JComponent;

import view.Login;

public class ActionLogin implements ActionListener {

	@Override
	public void actionPerformed(ActionEvent e) {
		String b = ((JButton) e.getSource()).getName();
		if (b.contentEquals("login"))
			Login.validateLogin();
		if (b.contentEquals("registra"))
			Engine.startRegistration();

		((JComponent)e.getSource()).requestFocus();
	}

}
